<?php

class PagesController extends AppController {

    var $name = 'Pages';
    var $uses = array();
    var $helpers = array('Html', 'Thumbnail', 'Text');

    function beforeFilter() {
        parent::beforeFilter();
        $this->Auth->allow('*');
    }

    function index() {
        $this->set('title_for_layout', 'Authentic Avenue');
        $this->loadModel('Category');
        $this->loadModel('Product');
        $this->set('item', $this->Category->categoryArray());
        $homePageContent = $this->Product->homePageProducts1($this->Category->randomCategory());
        //pr($homePageContent);
        $this->set('homePageContent', $homePageContent);
        $this->set('homePageSlider', $this->Product->homePageSlider());
        $this->layout = 'home';
    }

}